/**
 * 
 */
package com.glela.common.exception;

/**
 * @author liujie
 *
 * 业务端异常基类
 */
public class BusinessException extends Exception {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * 业务异常的错误编码
	 */
	private BusinessError businessError;
	/**
	 * 获取业务异常的错误编码
	 * @return 业务异常的错误编码
	 */
	public BusinessError getBusinessError(){
		return this.businessError;
	}
	
	/**
	 * 业务异常构造函数
	 * @param businessError
	 * @param msg
	 */
	public BusinessException(BusinessError businessError,String message){
		super(message);
		this.businessError = businessError;
	}
	
	/**
	 * 业务异常构造函数
	 * @param businessError
	 * @param message
	 * @param cause
	 */
	public BusinessException(BusinessError businessError, String message, Throwable cause) {
        super(message, cause);
        this.businessError = businessError;
    }

}
